zd = {
	toPrototype : function(o) {
		return Object.prototype.toString.call(o);
	},
	isArrar : function(o) {
		if (this.toPrototype(o) == '[object Array]') {
			return true;
		} else {
			return false;
		}
	},
	isString : function(o) {
		if (this.toPrototype(o) == '[object String]') {
			return true;
		} else {
			return false;
		}
	},
	isIE : function() {
		return navigator.userAgent.toLowerCase().indexOf("msie") > -1;
	}()
};
zd.js = function(url, fn, sync, scope) {
	url = url || [];
	fn = fn || new Function();
	scope = scope || window;
	if (this.isString(url)) {
		url = [ url ];
	}
	var es = [];
	for ( var i = 0; i < url.length; i++) {
		var e = document.createElement("script");
		e.setAttribute('type', 'text/javascript');
		e.setAttribute('src', url[i]);
		es.push(e);
	}
	var num = es.length;
	var doc = document.getElementsByTagName('head')[0];
	var index = 0;
	var scan = function() {
		index++;
		if (index == num) {
			fn.call(scope);
		}
	};
	var inner = function(o, r) {
		var callee = function() {
			if (r) {
				if (r.length > 0) {
					var o = r.shift();
					inner(o, r);
				}
			}
		};
		if (!zd.isIE) {
			o.onload = function() {
				callee();
				scan();
			};
		} else {
			o.onreadystatechange = function() {
				if (o.readyState == 'loaded' || o.readyState == 'complete') {
					callee();
					scan();
				}
			}
		}
		doc.appendChild(o);
	};
	if (sync) {
		if (es.length > 0) {
			var o = es.shift();
			inner(o, es);
		}
	} else {
		for ( var i = 0; i < es.length; i++) {
			inner(es[i]);
		}
	}
};